package com.suxiaoxiao.springbootlearn.designpattern.commandpattern.commands.stereo;

import com.suxiaoxiao.springbootlearn.designpattern.commandpattern.commands.Command;

/**
 * 关闭音响命令
 * @author 、
 */
public class StereoOffCommand implements Command {

    Stereo stereo;

    public StereoOffCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.off();
    }

    @Override
    public void undo() {
        stereo.on();
    }

}
